<html>

<head>
    <meta charset="utf-8">
    <title>{% if session.signin %}{{ session.nickName}} - NewbieTown{% else %}NewbieTown{% endif %}</title>
    <script src="static/js/mdui.min.js"></script>
    <link rel="stylesheet" href="static/css/mdui.min.css">
</head>

<body class="mdui-appbar-with-toolbar mdui-drawer-body-left">
    <div class="mdui-appbar mdui-appbar-fixed mdui-shadow-8">
        <div class="mdui-toolbar mdui-color-blue">
            <a href="/" class="mdui-typo-headline mdui-col-xs-2">NewbieTown</a>
            <div class="mdui-textfield mdui-textfield-expandable mdui-col-xs-4 mdui-center mdui-hidden-xs-down">
                <button class="mdui-textfield-icon mdui-btn mdui-btn-icon"><i class="mdui-icon material-icons">&#xe8b6;</i></button>
                <input class="mdui-textfield-input" type="text" placeholder="客官找点啥?" />
                <button class="mdui-textfield-close mdui-btn mdui-btn-icon"><i class="mdui-icon material-icons">&#xe5cd;</i></button>
            </div>
            <a href="javascript:;" class="mdui-btn mdui-btn-icon mdui-hidden-xs-down"><i class="mdui-icon material-icons">&#xe002;</i></a>
            <a href="javascript:;" class="mdui-btn mdui-btn-icon mdui-hidden-xs-down"><i class="mdui-icon material-icons">&#xe0c9;</i></a>            {% if session.signin %}
            <div class="mdui-btn mdui-btn-icon mdui-list-item-avatar mdui-hidden-xs-down mdui-float-right" mdui-menu="{target: '#menu'}">
                <img src="static/avatars/avatar.jpg">
            </div>
            <ul class="mdui-menu" id="menu" style="margin-top: 66px;">
                <li class="mdui-menu-item">
                    <a href="javascript:;" class="mdui-ripple">
                        <i class="mdui-menu-item-icon mdui-icon material-icons mdui-text-color-blue">&#xe851;</i>个人中心
                    </a>
                </li>
                <li class="mdui-menu-item">
                    <a href="javascript:;" class="mdui-ripple">
                        <i class="mdui-menu-item-icon mdui-icon material-icons"></i>Download
                    </a>
                </li>
                <li class="mdui-divider"></li>
                <li class="mdui-menu-item">
                    <a href="javascript:;" class="mdui-ripple">
                        <i class="mdui-menu-item-icon mdui-icon material-icons"></i>Remove
                    </a>
                </li>
                <li class="mdui-menu-item">
                    <a class="mdui-ripple" mdui-dialog="{target: '#signoutDialog'}">
                        <i class="mdui-menu-item-icon mdui-icon material-icons mdui-text-color-purple">&#xe899;</i>登出
                    </a>
                </li>
            </ul>
            {% endif %}
        </div>
    </div>
    <div class="mdui-drawer mdui-drawer-scrollbar" style="overflow-y: hidden;">
        <div class="mdui-list">
            <div class="mdui-collapse-item ">
                <a href="/">
                    <div class="mdui-list-item mdui-ripple">
                        <i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-blue">&#xe88a;</i>
                        <div class="mdui-list-item-content">首页</div>
                    </div>
                </a>
            </div>
            <div class="mdui-collapse-item ">
                <a href="/groups">
                    <div class="mdui-list-item mdui-ripple">
                        <i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-deep-orange">&#xe886;</i>
                        <div class="mdui-list-item-content">群组</div>
                    </div>
                </a>
            </div>
            <div class="mdui-collapse-item">
                <a href="/random">
                    <div class="mdui-list-item mdui-ripple">
                        <i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-green">&#xe417;</i>
                        <div class="mdui-list-item-content">随机浏览</div>
                    </div>
                </a>
            </div>
            <div class="mdui-divider">
            </div>
            {% if session.signin %}
            <div class="mdui-collapse-item ">
                <div class="mdui-list-item mdui-ripple" mdui-dialog="{target: '#signoutDialog'}">
                    <i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-purple">&#xe899;</i>
                    <div class="mdui-list-item-content ">登出</div>
                </div>
            </div>
            {% else %}
            <div class="mdui-collapse-item ">
                <div class="mdui-list-item mdui-ripple" mdui-dialog="{target: '#signinForm'}">
                    <i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-purple">&#xe898;</i>
                    <div class="mdui-list-item-content ">登入</div>
                </div>
            </div>
            <div class="mdui-collapse-item ">
                <div class="mdui-list-item mdui-ripple" mdui-dialog="{target: '#signupDialog'}">
                    <i class="mdui-list-item-icon mdui-icon material-icons mdui-text-color-brown">&#xe851;</i>
                    <div class="mdui-list-item-content ">注册</div>
                </div>
            </div>
            {% endif %}
        </div>
    </div>
    <div class="mdui-container mdui-shadow-16 ">
        <ul class="mdui-list mdui-list-dense" style="margin-top: 1%;">
            <li class="mdui-list-item mdui-ripple">
                <div class="mdui-list-item-avatar mdui-hidden-xs-down" mdui-tooltip="{content: '该内容由用户 名字 发布', position: 'left'}">
                    <a href="/user/1"><img src="static/avatars/avatar.jpg" /></a>
                </div>
                <div class="mdui-list-item-content" mdui-tooltip="{content: '发布于 创世 板块<br>发布时间 2017-01-01', position: 'right'}">
                    <!--<div class="mdui-list-item-title">这是一个帖子标题</div>-->
                    <div class="mdui-list-item-text mdui-list-item-content">
                        <span class="mdui-text-color-theme-text">
                            这里我也不知道是什么
                        </span> - 这里是帖子内容这里是帖子内容这里是帖子内容这里是帖子内容这里是帖子内容这里是帖子内容这里是帖子内容这里是帖子内容这里是帖子内容这里是帖子内容这里是帖子内容这里是帖子内容这里是帖子内容
                    </div>
                </div>
                <i class="mdui-list-item-icon mdui-icon material-icons">&#xe0b7;</i>100
            </li>
            <li class="mdui-divider-inset mdui-m-y-0"></li>
            <li class="mdui-list-item mdui-ripple">
                <div class="mdui-list-item-avatar mdui-hidden-xs-down"><img src="static/avatars/avatar.jpg" /></div>
                <div class="mdui-list-item-content">
                    <div class="mdui-list-item-title">Brunch this weekend?</div>
                    <div class="mdui-list-item-text mdui-list-item-content"><span class="mdui-text-color-theme-text">All Connors</span> - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ...</div>
                </div>
            </li>
            <li class="mdui-divider-inset mdui-m-y-0"></li>
            <li class="mdui-list-item mdui-ripple">
                <div class="mdui-list-item-avatar mdui-hidden-xs-down"><img src="static/avatars/avatar.jpg" /></div>
                <div class="mdui-list-item-content">
                    <div class="mdui-list-item-title">Brunch this weekend?</div>
                    <div class="mdui-list-item-text mdui-list-item-content"><span class="mdui-text-color-theme-text">All Connors</span> - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ...</div>
                </div>
            </li>
            <li class="mdui-divider-inset mdui-m-y-0"></li>
            <li class="mdui-list-item mdui-ripple">
                <div class="mdui-list-item-avatar mdui-hidden-xs-down"><img src="static/avatars/avatar.jpg" /></div>
                <div class="mdui-list-item-content">
                    <div class="mdui-list-item-title">Brunch this weekend?</div>
                    <div class="mdui-list-item-text mdui-list-item-content"><span class="mdui-text-color-theme-text">All Connors</span> - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ...</div>
                </div>
            </li>
            <li class="mdui-divider-inset mdui-m-y-0"></li>
            <li class="mdui-list-item mdui-ripple">
                <div class="mdui-list-item-avatar mdui-hidden-xs-down"><img src="static/avatars/avatar.jpg" /></div>
                <div class="mdui-list-item-content">
                    <div class="mdui-list-item-title">Brunch this weekend?</div>
                    <div class="mdui-list-item-text mdui-list-item-content"><span class="mdui-text-color-theme-text">All Connors</span> - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ...</div>
                </div>
            </li>
            <li class="mdui-divider-inset mdui-m-y-0"></li>
            <li class="mdui-list-item mdui-ripple">
                <div class="mdui-list-item-avatar mdui-hidden-xs-down"><img src="static/avatars/avatar.jpg" /></div>
                <div class="mdui-list-item-content">
                    <div class="mdui-list-item-title">Brunch this weekend?</div>
                    <div class="mdui-list-item-text mdui-list-item-content"><span class="mdui-text-color-theme-text">All Connors</span> - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ...</div>
                </div>
            </li>
            <li class="mdui-divider-inset mdui-m-y-0"></li>
            <li class="mdui-list-item mdui-ripple">
                <div class="mdui-list-item-avatar mdui-hidden-xs-down"><img src="static/avatars/avatar.jpg" /></div>
                <div class="mdui-list-item-content">
                    <div class="mdui-list-item-title">Brunch this weekend?</div>
                    <div class="mdui-list-item-text mdui-list-item-content"><span class="mdui-text-color-theme-text">All Connors</span> - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ...</div>
                </div>
            </li>
            <li class="mdui-divider-inset mdui-m-y-0"></li>
            <li class="mdui-list-item mdui-ripple">
                <div class="mdui-list-item-avatar mdui-hidden-xs-down"><img src="static/avatars/avatar.jpg" /></div>
                <div class="mdui-list-item-content">
                    <div class="mdui-list-item-title">Brunch this weekend?</div>
                    <div class="mdui-list-item-text mdui-list-item-content"><span class="mdui-text-color-theme-text">All Connors</span> - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ...</div>
                </div>
            </li>
            <li class="mdui-divider-inset mdui-m-y-0"></li>
            <li class="mdui-list-item mdui-ripple">
                <div class="mdui-list-item-avatar mdui-hidden-xs-down"><img src="static/avatars/avatar.jpg" /></div>
                <div class="mdui-list-item-content">
                    <div class="mdui-list-item-title">Brunch this weekend?</div>
                    <div class="mdui-list-item-text mdui-list-item-content"><span class="mdui-text-color-theme-text">All Connors</span> - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ...</div>
                </div>
            </li>
            <li class="mdui-divider-inset mdui-m-y-0"></li>
            <li class="mdui-list-item mdui-ripple">
                <div class="mdui-list-item-avatar mdui-hidden-xs-down"><img src="static/avatars/avatar.jpg" /></div>
                <div class="mdui-list-item-content">
                    <div class="mdui-list-item-title">Brunch this weekend?</div>
                    <div class="mdui-list-item-text mdui-list-item-content"><span class="mdui-text-color-theme-text">All Connors</span> - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ...</div>
                </div>
            </li>
            <li class="mdui-divider-inset mdui-m-y-0"></li>
            <li class="mdui-list-item mdui-ripple">
                <div class="mdui-list-item-avatar mdui-hidden-xs-down"><img src="static/avatars/avatar.jpg" /></div>
                <div class="mdui-list-item-content">
                    <div class="mdui-list-item-title">Brunch this weekend?</div>
                    <div class="mdui-list-item-text mdui-list-item-content"><span class="mdui-text-color-theme-text">All Connors</span> - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ...</div>
                </div>
            </li>
            <li class="mdui-divider-inset mdui-m-y-0"></li>
            <li class="mdui-list-item mdui-ripple">
                <div class="mdui-list-item-avatar mdui-hidden-xs-down"><img src="static/avatars/avatar.jpg" /></div>
                <div class="mdui-list-item-content">
                    <div class="mdui-list-item-title">Brunch this weekend?</div>
                    <div class="mdui-list-item-text mdui-list-item-content"><span class="mdui-text-color-theme-text">All Connors</span> - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ... - I'll be in your neighborhood doing errands this weekend. Do you want
                        ... - I'll be in your neighborhood doing errands this weekend. Do you want ... - I'll be in your
                        neighborhood doing errands this weekend. Do you want ... - I'll be in your neighborhood doing errands
                        this weekend. Do you want ...</div>
                </div>
            </li>
            <li class="mdui-divider-inset mdui-m-y-0"></li>
        </ul>
        {% if session.signin %}
        <div class="mdui-fab-wrapper" mdui-fab>
            <button class="mdui-fab mdui-ripple mdui-color-blue">
            <i class="mdui-icon material-icons">&#xe145;</i>
            <i class="mdui-icon mdui-fab-opened material-icons">&#xe14c;</i>
            </button>
            <div class="mdui-fab-dial">
                <a href="/newarticle">
                    <button class="mdui-fab mdui-fab-mini mdui-ripple mdui-color-white mdui-hidden-xs-down" mdui-tooltip="{content: '发帖', position: 'left'}"
                        mdui-dialog="{target: '#newArticle'}"><i class="mdui-icon material-icons">&#xe254;</i></button>
                </a>
                <button class="mdui-fab mdui-fab-mini mdui-ripple mdui-color-white" mdui-tooltip="{content: '我的收藏', position: 'left'}"><i class="mdui-icon material-icons">&#xe617;</i></button>
            </div>
        </div>
        {% endif %}
        <div class="mdui-dialog" id="signinForm">
            <div class="mdui-dialog-title mdui-color-light-blue mdui-text-color-white">骚年, 登入之后才能召唤神龙唷~</div>
            <div class="mdui-dialog-content">
                <form action="/signin" method="POST">
                    <div class="signinForm" style="margin-top: 1%;">
                        <div class="mdui-textfield mdui-textfield-floating-label">
                            <i class="mdui-icon material-icons"></i>
                            <input class="mdui-textfield-input" name="email" type="email" placeholder="您注册时候用的邮箱" required>
                            <div class="mdui-textfield-error">邮箱格式错误</div>
                        </div>
                        <div class="mdui-textfield mdui-textfield-floating-label">
                            <i class="mdui-icon material-icons"></i>
                            <label class="mdui-textfield-label">如果忘记密码,请点击下面的按钮找回密码之后登入</label>
                            <input class="mdui-textfield-input" name="password" type="password" pattern="^.*(?=.{6,})(?=.*[a-z])(?=.*[A-Z]).*$" required="">
                            <div class="mdui-textfield-error">密码至少 6 位，且包含大小写字母</div>
                        </div>
                        <br>
                        <div class="mdui-row-xs-2">
                            <div class="mdui-col">
                                <a class="mdui-btn mdui-btn-block mdui-color-grey-100 mdui-ripple mdui-shadow-2" href="/forgotPassword">忘记密码</a>
                            </div>
                            <div class="mdui-col">
                                <button class="mdui-btn mdui-btn-block mdui-color-blue mdui-ripple mdui-shadow-2" type="submit">登入</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="mdui-dialog" id="signupDialog">
            <div class="mdui-dialog-title mdui-color-light-blue mdui-text-color-white">火钳刘明, 这位少侠注册个账号吧~</div>
            <form action="/signup" method="POST">
                <div class="mdui-dialog-content" style="margin-top: 1%;">
                    <div class="mdui-textfield">
                        <i class="mdui-icon material-icons">&#xe86f;</i>
                        <input class="mdui-textfield-input" type="text" placeholder="注册邀请码" disabled />
                        <div class="mdui-textfield-error">邀请码错误</div>
                    </div>
                    <div class="mdui-textfield">
                        <i class="mdui-icon material-icons">&#xe0be;</i>
                        <input class="mdui-textfield-input" name="email" type="email" placeholder="您的Email地址" />
                        <div class="mdui-textfield-error">Email地址错误</div>
                    </div>
                    <!-- 固定标签 -->
                    <div class="mdui-textfield mdui-textfield-floating-label">
                        <i class="mdui-icon material-icons">&#xe853;</i>
                        <input class="mdui-textfield-input" name="nickname" type="text" placeholder="昵称" />
                        <div class="mdui-textfield-error">昵称已被使用</div>
                    </div>
                    <div class="mdui-textfield mdui-textfield-floating-label">
                        <i class="mdui-icon material-icons">&#xe325;</i>
                        <input class="mdui-textfield-input" name="tel" type="tel" pattern="^1[0-9]{10}$" placeholder="您的手机号码,用于找回密码用" required/>
                        <div class="mdui-textfield-error">手机号码必须是全数字,并且长度 11 位</div>
                    </div>
                    <div class="mdui-textfield mdui-textfield-floating-label">
                        <i class="mdui-icon material-icons">&#xe63f;</i>
                        <label class="mdui-textfield-label">设置一个密码</label>
                        <input class="mdui-textfield-input" name="password" type="password" pattern="^.*(?=.{6,})(?=.*[a-z])(?=.*[A-Z]).*$" required/>
                        <div class="mdui-textfield-error">密码至少 6 位，且包含大小写字母</div>
                    </div>
                    <br>
                    <button class="mdui-btn mdui-btn-raised mdui-btn-dense mdui-color-blue mdui-ripple mdui-btn-block" type="submit">注册</button>
                </div>
            </form>
        </div>
        <div class="mdui-dialog" id="signoutDialog">
            <div class="mdui-dialog-title mdui-color-light-blue mdui-text-color-white">真的打算走了?</div>
            <div class="mdui-dialog-content">轻轻的你走了, 正如你轻轻的来, 你挥一挥手, 不带走一片云彩.../(ㄒoㄒ)/~~<br>虽然万分不舍, 但是我还是会对你说:<span class="mdui-text-color-pink">"客官, 有空常来玩~~O(∩_∩)O"</span></div>
            <div class="mdui-dialog-actions">
                <a href="/signout"> <button class="mdui-btn mdui-ripple mdui-hoverable mdui-float-left mdui-btn-raised">嗯, 非走不可了</button></a>
                <button class="mdui-btn mdui-ripple mdui-color-blue mdui-hoverable mdui-btn-raised" mdui-dialog-close>算了, 我再留下来看看</button>
            </div>
        </div>
</body>

</html>